
from django.contrib import admin
from django.urls import path, include
from . import views
from django.views.generic import TemplateView

app_name = 'front4'

urlpatterns = [
    path('index/', views.index, name='index'),
    path('book/', views.BookListView.as_view(), name='BookList'),
    path('add_book/', views.AddBookView.as_view(), name='add_book'),
    path('detail/<book_id>/', views.BookDetailView.as_view(), name='detail'),
    # 如果渲染的模板不需要传递任何的参数，那么建议在urls中使用TemplateView
    path('about/', TemplateView.as_view(template_name='about.html')),
    path('about1/', views.AboutView.as_view()),
]